<template>
  <div v-if="is_info"><a target="_blank" :href="value.href">{{value.title}}</a> </div>
  <div v-else class="form_item-">
    <input type="hidden" :name="name" :value="value">
    <a target="_blank" :href="value.href">{{value.title}}</a>
  </div>
</template>

<script>
export default {
  _title_: '链接详情',
  _can_form_param_: true,
  name: "link_info",
  props: ['name', 'value', 'config', 'is_info', 'size', 'is_list'],
  emits: ['update:value', 'change'],
  data(){
    return {
      need_display: true,
      this_value: this.value,
    }
  },
  methods: {
    update_value(v){
      this.need_display = false;
      setTimeout(()=>{this.need_display = true;},5);
      this.$emit('update:value', v);
      this.$emit('change', v);
    },
  },
  watch: {
    value(){
      if (!this.need_display) return;
      this.this_value = this.value;
    }
  },
  computed: {
  },
}
</script>

<style scoped>

</style>